package com.stu.mapper;

import com.stu.pojo.Scholarship;
import com.stu.pojo.ScholarshipStuInformation;
import com.stu.vo.ScholarshipStuInformationVo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ScholarshipMapper {
    @Select("select * from scholarship")
    List<Scholarship> selectScholarship();

    @Insert("insert into scholarship_stu_information " +
            "(stu_id, application_award, scholarship_type, award_cycle, money, application_time) " +
            "VALUES " +
            "(#{stuId}, #{applicationAward}, #{scholarshipType}, #{awardCycle}, #{money}, #{applicationTime})")
    void insertScholarship(ScholarshipStuInformation sI);

    @Select("select * from scholarship_stu_information")
    List<ScholarshipStuInformationVo> selectScholarshipAll();
}
